-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update subscriptions view to display video publish time in relative form even fetched via RSS #3216
Update subscriptions view to display video publish time in relative form even fetched via RSS #3216
Conversation
… form even fetched via RSS
d07a1e3
to
882441d
Compare
let timeDiffFromNow = ((now - this.data.publishedDate) / 1000) / 60 | ||
let timeUnit = 'minute' | ||
|
||
if (timeDiffFromNow > 60) { | ||
timeDiffFromNow /= 60 | ||
timeUnit = 'hour' | ||
} | ||
|
||
if (timeUnit === 'hour' && timeDiffFromNow > 24) { | ||
timeDiffFromNow /= 24 | ||
timeUnit = 'day' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add support for seconds (it's rare but happens) as well as months and years?
I'm subscribed to one channel that hasn't uploaded in 3 years but i'm subscribed to keep it easily accessible.
Also add more code comments Also fix issue of display after switching back from another view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Update subscriptions view to display video publish time in relative form even fetched via RSS
Pull Request Type
Related issue
N/A
Description
Currently subscriptions view displays video publish times in absolute form when
Fetch Feeds from RSS
enabledThis PR updated it to display time in relative form like when it's disabled
Screenshots
Testing
Fetch Feeds from RSS
Desktop
Additional context